package com.zkthink.ceres.applet.authority.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**

@Author cmz
@Date 2024-04-29 16:39
*/

/**
    * 商城会员信息
    */
@Data
@TableName(value = "ceres_member")
public class AppletMember {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会员微信OPENID
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 登录用户名
     */
    @TableField(value = "account")
    private String account;

    /**
     * 会员手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 登录密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 余额支付密码
     */
    @TableField(value = "pay_password")
    private String payPassword;

    /**
     * 会员昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 会员头像
     */
    @TableField(value = "headimg")
    private String headimg;

    /**
     * 用户类型 1-普通用户 2-商家用户 3-核销人员
     */
    @TableField(value = "user_type")
    private Integer userType;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private String sex;

    /**
     * 会员级别
     */
    @TableField(value = "level")
    private Byte level;

    /**
     * 默认收货地址
     */
    @TableField(value = "address_id")
    private Long addressId;

    /**
     * 会员个性签名
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 会员状态0正常 1拉黑
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 最后一次登录时间
     */
    @TableField(value = "login_time")
    private Date loginTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user")
    private Long createUser;

    /**
     * 更新人
     */
    @TableField(value = "update_user")
    private Long updateUser;

    /**
     * 登录次数
     */
    @TableField(value = "login_num")
    private Integer loginNum;

    /**
     * 是否为分销商 0 否 1 是
     */
    @TableField(value = "is_distribute")
    private Byte isDistribute;

    /**
     * 第一个上级
     */
    @TableField(value = "first_leader")
    private Long firstLeader;

    /**
     * 第二个上级
     */
    @TableField(value = "second_leader")
    private Long secondLeader;

    /**
     * 第三个上级
     */
    @TableField(value = "third_leader")
    private Long thirdLeader;

    /**
     * 消费总额
     */
    @TableField(value = "expend_amount")
    private Long expendAmount;

    /**
     * 购买次数
     */
    @TableField(value = "buy_times")
    private Integer buyTimes;

    /**
     * 最近一次购买时间
     */
    @TableField(value = "last_buy_time")
    private Date lastBuyTime;

    /**
     * 会员积分
     */
    @TableField(value = "integral")
    private BigDecimal integral;

    /**
     * 车牌号
     */
    @TableField(value = "license_plate")
    private String licensePlate;

    /**
     * vip到期时间
     */
    @TableField(value = "vip_time")
    private Date vipTime;

    /**
     * 消费金
     */
    @TableField(value = "coupons")
    private BigDecimal coupons;

    /**
     * 余额
     */
    @TableField(value = "balance")
    private BigDecimal balance;

    /**
     * 推荐人电话
     */
    @TableField(value = "refer_phone")
    private String referPhone;

    /**
     * 提成
     */
    @TableField(value = "tichneg")
    private BigDecimal tichneg;

//    /**
//     * 逻辑删除 1-删除 0-未删除
//     */
//    @TableField(value = "is_delete")
//    @TableLogic(value = "0",delval = "1")
//    private Integer isDelete;

    public static final String COL_ID = "id";

    public static final String COL_OPENID = "openid";

    public static final String COL_ACCOUNT = "account";

    public static final String COL_PHONE = "phone";

    public static final String COL_PASSWORD = "password";

    public static final String COL_PAY_PASSWORD = "pay_password";

    public static final String COL_NICKNAME = "nickname";

    public static final String COL_HEADIMG = "headimg";

    public static final String COL_USER_TYPE = "user_type";

    public static final String COL_SEX = "sex";

    public static final String COL_LEVEL = "level";

    public static final String COL_ADDRESS_ID = "address_id";

    public static final String COL_REMARK = "remark";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_LOGIN_TIME = "login_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_CREATE_USER = "create_user";

    public static final String COL_UPDATE_USER = "update_user";

    public static final String COL_LOGIN_NUM = "login_num";

    public static final String COL_IS_DISTRIBUTE = "is_distribute";

    public static final String COL_FIRST_LEADER = "first_leader";

    public static final String COL_SECOND_LEADER = "second_leader";

    public static final String COL_THIRD_LEADER = "third_leader";

    public static final String COL_EXPEND_AMOUNT = "expend_amount";

    public static final String COL_BUY_TIMES = "buy_times";

    public static final String COL_LAST_BUY_TIME = "last_buy_time";

    public static final String COL_INTEGRAL = "integral";

    public static final String COL_LICENSE_PLATE = "license_plate";

    public static final String COL_VIP_TIME = "vip_time";

    public static final String COL_COUPONS = "coupons";

    public static final String COL_BALANCE = "balance";

    public static final String COL_REFER_PHONE = "refer_phone";

    public static final String COL_TICHNEG = "tichneg";

    /*public static final String COL_IS_DELETE = "is_delete";*/
}